package org.ctd.springframework.beans.factory.xml;

import org.w3c.dom.Document;
import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;

/**
 * DocumentLoader
 * 定义从资 源、文件加载到转换为 Document 的功能
 *
 * @author chentudong
 * @time 2019/3/24 22:23
 */
public interface DocumentLoader {
    /**
     * 加载 Document
     *
     * @param inputSource    inputSource
     * @param entityResolver entityResolver
     * @param errorHandler   errorHandler
     * @param validationMode validationMode
     * @param namespaceAware namespaceAware
     * @return Document
     * @throws Exception Exception
     */
    Document loadDocument(InputSource inputSource, EntityResolver entityResolver,
                          ErrorHandler errorHandler, int validationMode, boolean namespaceAware)
            throws Exception;
}
